package exceptions;

import attribute.*;
import be.kuleuven.cs.som.annotate.*;

/**
 * @author John Breyssem	1Ba Informatica		r0303394
 * 
 * @author Lars Feyaerts	1Ba Informatica		r0296831
 * 
 * @version	1.3
 *
 */
@SuppressWarnings("serial")
public class PositionTakenException extends RuntimeException{
	private final Position position;
	private final Board board;
	
	/**
	 * Initialise this new position taken exception with the given position and the givne board.
	 * 
	 * @param position
	 * 			The position for this new position taken exception
	 * @param board
	 * 			The board for this new position taken exception
	 * @post ...
	 * 			|new.getPosition() = position
	 * @post ...
	 * 			|new.getBoard() = board
	 * @effect ...
	 * 			|super()
	 */
	public PositionTakenException(Position position, Board board){
		this.position = position;
		this.board = board;
	}
	
	/**
	 * Return the position of this position taken exception
	 */
	@Basic @Raw @Immutable
	public Position getPosition(){
		return this.position;
	}
	
	/**
	 * Return the board of this position taken exception
	 */
	@Basic @Raw @Immutable
	public Board getBoard(){
		return this.board;
	}
}
